home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / program / eflibpt4.zip / DEMO / SCREEN / WRITE1.PAS < prev    next >
Pascal/Delphi Source File  |  1996-08-16  |  1KB  |  32 lines

  1. { Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
  2.   Demonstration; screen write #1 - performance test
  3.  
  4.   EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
  5.   MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
  6.   ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED.                          }
  7.  
  8.  
  9. uses EFLIBDEF, EFLIBINI, EFLIBBAS, EFLIBTXT, EFLIBOBJ, EFLIBSCR, CRT;
  10.  
  11. const Tests = 25;
  12. var X, Y, Count : byte; TestString : string; Timer : TimerObjectType;
  13.  
  14.  
  15. begin
  16.      TestString:= 'TestString|';
  17.      TestString := StringFill (5, TestString);
  18.      Timer.Initialize;
  19.  
  20.      { Perform screen writing tests; write test string on every possible
  21.        position on screen horizontally and vertically }
  22.      for Count := 1 to Tests do begin
  23.          for X := 1 to Screen.ScreenWidth do for Y := 1 to Screen.ScreenHeight do
  24.              Screen.WriteXYColor (X, Y, TestString, Random(14)+1, 0);
  25.      end;
  26.  
  27.      if Application^.IsInitialized then
  28.         Application^.RestoreStartScreen;
  29.  
  30.      Write ('How fast is fast? ');
  31.      with Timer do begin WriteLn (StringMS); Intercept; end;
  32. end.